Skip to content

Rework getting started pages #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: 7.x
Choose a base branch
from
Open

Conversation

rsill-neo4j
Copy link
Contributor

No description provided.

Comment on lines +45 to +46
Alternatively, if you already have data in the AuraDB, you can obtain your type definitions via the https://graphql-toolbox.neo4j.io[Neo4j GraphQL Toolbox].
The toolbox can connect to the AuraDB and automatically create type definitions and allow GraphQL operations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note we want to have the introspection feature in the Aura console soon, so this will need to be updated to reflect that when it's added.

=== Authentication providers

All requests to the GraphQL API are authenticated and there are two options for the type of authentication: API key or JSON Web Key Set (JWKS).
It is possible to use these in combination and have multiples of each.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Liam-Doodson just to double check, we only allow use of a single authentication provider per query, right?

That may need to be reflected here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah in a single request to the api, you can only use a single auth provider. However, the api can be configured multiple different auth providers e.g. on one request you can use an api key, the next request use a jwt and then maybe a different api key on a third request

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rephrased

rsill-neo4j and others added 3 commits July 4, 2025 10:18

[source, javascript, indent=0]
----
const driver = neo4j.driver(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I love that we're hardcoding the credentials here without a note that it's not best practice (anyone with access to your source code now has access to your DB).

Either we just add a warning/note about this risk or we should try to use environment variables e.g.

const {
    NEO4J_URI = "neo4j://localhost:7687/neo4j",
    NEO4J_USERNAME = "neo4j",
    NEO4J_PASSWORD = "password",
} = process.env;

const driver = neo4j.driver(
    NEO4J_URI,
    neo4j.auth.basic(NEO4J_USERNAME, NEO4J_PASSWORD)
);

With this example it's still possible to hardcode to get going quickly but we should prompt the user to not commit real creds and set them using environment variables going forward

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you have any thoughts on this or better ideas @mjfwebb?


To learn more, keep reading the documentation about xref:queries-aggregations/index.adoc[Queries and aggregations] or alternatively learn how to use the xref:getting-started/toolbox.adoc[Neo4j GraphQL Toolbox].
For more advanced database settings, refer to the xref:driver-configuration.adoc[Driver configuration] page.
These pages walks you through creating a new project with the Neo4j GraphQL Library.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These guides are both based on the northwind dataset right?

Is it worth mentioning here or maybe at the end of the guides that as a next step users could try loading that dataset into their db and extending the schema for the full data set to see what that adds to their api?

Ideally we could also write a guide for this in the future too!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i had added a reference to the northwind dataset initially, but the examples work without it so far (or rather, only work when no other data is present). the idea was to go in that direction and make it the default data set for all examples

i'd say, we leave it out for now, and revisit when the picture is more coherent. maybe we could add a page that is specifically about importing and then making the northwind set available to a client via the api

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we can leave for now then. Tbf, I think we'll be able to get to a tutorial for a more complex schema soon anyway and that would be a good time to look at this anyway

rsill-neo4j and others added 2 commits July 7, 2025 16:42
Co-authored-by: Liam-Doodson <114480811+Liam-Doodson@users.noreply.github.com>
@neo4j-docops-agent
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants